package com.sunhao.springboot_satoken.service.impl;

import com.sunhao.springboot_satoken.domain.dos.RoleDo;
import com.sunhao.springboot_satoken.mapper.RoleMapper;
import com.sunhao.springboot_satoken.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Objects;

/**
 * @ClassName RoleServiceImpl
 * @Description
 * @Author SunHao
 * @Date 2025/7/25 21:29
 * @Version 1.0
 **/
@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    private RoleMapper roleMapper;

    @Override
    public RoleDo selectRoleById(Long id) {
        RoleDo roleDo = roleMapper.selectById(id);
        if (Objects.nonNull(roleDo)) {
            return roleDo;
        }
        return null;
    }
}
